#include "stdafx.h"
#include "BaseTreeDialog.h"


BEGIN_MESSAGE_MAP(CBaseTreeDialog, CSizingControlBarG)
  ON_WM_CREATE()
  ON_WM_SIZE()
END_MESSAGE_MAP()


CBaseTreeDialog::CBaseTreeDialog(CCreateContext* pContext)
{
  m_pContext = pContext;
  CRuntimeClass* pFactory = RUNTIME_CLASS(CBibleTree);
  m_pTreeView = (CBibleTree *)(pFactory->CreateObject() );

}

int CBaseTreeDialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
  if (CSizingControlBarG::OnCreate(lpCreateStruct) == -1)
    return -1;

   if (m_pTreeView )  m_pTreeView->CreateView(this, m_pContext);
  
    return 0;
}


void CBaseTreeDialog::OnSize(UINT nType, int cx, int cy)
{
  CSizingControlBarG::OnSize(nType, cx, cy);
  m_pTreeView->SetWindowPos(NULL,0,0,cx,cy,SWP_NOZORDER | SWP_NOACTIVATE);
        

}

CBaseTreeDialog::~CBaseTreeDialog(void)
{
}


void CBaseTreeDialog::SetSize(int cx, int cy)
{
   m_szHorz =  CSize(cx, cy);
   m_szVert = CSize(cx, cy);
   m_szFloat = CSize(cx, cy);
}

